package com.study.reflect;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Proxy;

/**
 * @Author HBZ
 * @Date 2020/7/29 23:07
 * @Description
 */
public class ProxyTest1 {
    public static void main(String[] args) {
        InvocationHandler invocationHandler=new MyInvocationHandler();
        Person person=(Person) Proxy.newProxyInstance(Person.class.getClassLoader(),new Class[]{Person.class},invocationHandler);
        person.walk();
        person.sayHello("hh");
    }
}
